OpenBSD Wireguard implementation - #3750
Conversation
ipspace
left a comment
There was a problem hiding this comment.
A minor detail that should be fixed (I can do that before merging the PR if you don't have time), otherwise all good.
Thank you!
| {% else %} | ||
| ifconfig {{ intf.ifname }} up | ||
| {% endif %} | ||
| {% if 'ipv6' in intf and intf.tunnel.mode|default('') in ['wireguard'] %} |
There was a problem hiding this comment.
I think this should go into openbsd.initial.j2. Also, you can use node ID ({{ id }}), it's guaranteed to be unique, so it all comes down to 'fe80::%x/64'|format(id)
There was a problem hiding this comment.
Are you saying it should go into the wireguard/openbsd.initial.j2 ?
It can't go there, because we kill any IPv4 / IPv6 addresses at the start of the ifconfig macro
That was where I did have it until I realised that it got overridden, aka why it now lives at bottom of the macro.
I'd say it's almost there.
LAN interfaces are technically multipoint but have LLAs. I'm sure there's some convoluted reason for that decision, but it's not "because the interface is multipoint"
Thank you, fixed that bit of the integration test.
Talk with @jbemmel ;)
Call it organic growth ;)) Tunnels are implemented as plugins (because there are so many different options, and I expect each option to be well-supported by just a few devices), so they use custom configuration templates, which are executed last 🤷🏻♂️ |
My thinking was that users typically select ipv4 and/or ipv6 at the topology level, rather than the individual modules. Similar to how OSPFv3 isn’t selected directly But everything can be changed of course - I wanted to get something out there, and then iterate |
|
@jbemmel no issue, just something I noticed vs the GRE module. @ipspace one other minor note in relation to testing is, we have IPv4/IPv6 flowing over the tunnel but the |
This is more open for comment than ready for commit.
Three issues:
One other question, is there a reason why we might do tunnel setup after our routing protocols like OSPF?
If tunnels happened before OSPF, I could move my 'non ideal' hack out of initial and just into the Wireguard config for OpenBSD.
Wireguard Test output